<template>
  <div class="black-layout">
    <div class="black-layout-head">
      <h2 class="blh-title">{{ title }}</h2>
      <div class="blh-buttons">
        <slot name="buttons" />
      </div>
    </div>
    <slot />
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: ''
    }
  }
}
</script>

<style lang="less" scoped>
.black-layout {
  background-color: @menuBg;
  &-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    padding: 0 31px 0 17px;
    border-bottom: 1px solid #3a465c;
  }
}
.blh {
  &-title {
    font-family: PingFangSC-Medium, PingFang SC;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
  }
  &-buttons {
    display: flex;
    align-items: center;
    > * {
      margin-left: 8px;
    }
  }
}
</style>
